<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    let arr = [1,3,8,2,9]
    let num = +prompt('请输入一个数验证')

    function ji(array,a){
      let flag = false
      for(let i = 0; i < array.length; i++){
      for(let j = array.length; j > i; j--){
        if(array[i]*array[j] == a){
          flag = true
          alert(`积为${a}的两数为${array[i]}、${array[j]}`)
        }
      } 
    }
    if(flag === false){
      alert('false')
    }
    }
    ji(arr,num)


  </script>
</body>
</html>